import { Loading } from 'element-ui'
import { mapMutations, mapGetters } from 'vuex'
export default {
  computed: {
    ...mapGetters('adminLoading',[
      'getActiveState',
      'getPageLen',
      'getCurrentPage'
    ])
  },
  methods: {
    ...mapMutations('adminLoading',[
      'setActiveState',
      'setPageLen',
      'setCurrentPage'
    ]),
    loadingTabsList () { // 剪切到混入去了
      // 加载之后当前status赋值给上一个status
      this.prevStatus = this.getActiveState

      Loading.service();

      // 加载admin用户数据
      this.$http.getMan({ status: this.getActiveState, len:this.getPageLen, page: this.getCurrentPage }).then(res => {
        this.changeBackstageTableList(res.data.data)
        console.log(res.data)
        // 请求时获取到
        this.adminListTotal = res.data.count
        Loading.service().close();
      })

    },
  }
}